home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 4 / Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso / Pearls / dev / Language / ace / include / Exec / execbase.h < prev    next >
C/C++ Source or Header  |  1995-10-07  |  8KB  |  227 lines

  1. #ifndef EXEC_EXECBASE_H
  2. #define EXEC_EXECBASE_H 1
  3. /*
  4. ** execbase.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/02/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for execbase.h
  17. */
  18. #ifndef ExecBasePtr
  19. #define ExecBasePtr ADDRESS
  20. #endif
  21. /*
  22. ** End of StructPointer defines for execbase.h
  23. */
  24.       
  25. #ifndef EXEC_LISTS_H
  26. #include <exec/lists.h>
  27. #endif /* EXEC_LISTS_H */
  28.  
  29. #ifndef EXEC_INTERRUPTS_H
  30. #include <exec/interrupts.h>
  31. #endif /* EXEC_INTERRUPTS_H */
  32.  
  33. #ifndef EXEC_LIBRARIES_H
  34. #include <exec/libraries.h>
  35. #endif /* EXEC_LIBRARIES_H */
  36.  
  37. #ifndef EXEC_TASKS_H
  38. #include <exec/tasks.h>
  39. #endif /* EXEC_TASKS_H */
  40.  
  41.  
  42. /* Definition of the Exec library base structure (pointed to by location 4).
  43. ** Most fields are not to be viewed or modified by user programs.  Use
  44. ** extreme caution.
  45. */
  46. STRUCT ExecBase  
  47.     _Library LibNode  /* Standard library node */
  48.  
  49. /******** Static System Variables ********/
  50.  
  51.     SHORTINT   SoftVer     /* kickstart release number (obs.) */
  52.     SHORTINT    LowMemChkSum    /* checksum of 68000 trap vectors */
  53.     LONGINT   ChkBase     /* system base pointer complement */
  54.     ADDRESS    ColdCapture     /* coldstart soft capture vector */
  55.     ADDRESS    CoolCapture     /* coolstart soft capture vector */
  56.     ADDRESS    WarmCapture     /* warmstart soft capture vector */
  57.     ADDRESS    SysStkUpper     /* system stack base   (upper bound) */
  58.     ADDRESS    SysStkLower     /* top of system stack (lower bound) */
  59.     LONGINT   MaxLocMem   /* top of chip memory */
  60.     ADDRESS    DebugEntry  /* global debugger entry point */
  61.     ADDRESS    DebugData   /* global debugger data segment */
  62.     ADDRESS    AlertData   /* alert data segment */
  63.     ADDRESS    MaxExtMem   /* top of extended mem,  or null if none */
  64.  
  65.     SHORTINT   ChkSum  /* for all of the above (minus 2) */
  66.  
  67. /****** Interrupt Related ***************************************/
  68.  
  69.     STRING IntVects SIZE 192  /* 16*12  */
  70.  
  71. /****** Dynamic System Variables *************************************/
  72.  
  73.     TaskPtr  ThisTask  /* pointer to current task (readable) */
  74.  
  75.     LONGINT   IdleCount   /* idle counter */
  76.     LONGINT   DispCount   /* dispatch counter */
  77.     SHORTINT   Quantum     /* time slice quantum */
  78.     SHORTINT   Elapsed     /* current quantum ticks */
  79.     SHORTINT   SysFlags    /* misc internal system flags */
  80.     BYTE    IDNestCnt   /* interrupt disable nesting count */
  81.     BYTE    TDNestCnt   /* task disable nesting count */
  82.  
  83.     SHORTINT   AttnFlags   /* special attention flags (readable) */
  84.  
  85.     SHORTINT   AttnResched     /* rescheduling attention */
  86.     ADDRESS    ResModules  /* resident module array pointer */
  87.     ADDRESS    TaskTrapCode 
  88.     ADDRESS    TaskExceptCode 
  89.     ADDRESS    TaskExitCode 
  90.     LONGINT   TaskSigAlloc 
  91.     SHORTINT   TaskTrapAlloc 
  92.  
  93.  
  94. /****** System Lists (private!) ********************************/
  95.  
  96.     _List MemList 
  97.     _List ResourceList 
  98.     _List DeviceList 
  99.     _List IntrList 
  100.     _List LibList 
  101.     _List PortList 
  102.     _List TaskReady 
  103.     _List TaskWait 
  104.  
  105.     STRING SoftInts SIZE 80  /* 5*16 */
  106.  
  107. /****** Other Globals *******************************************/
  108.  
  109.     STRING LastAlert SIZE 16   /* 4*SIZEOF(LONGINT)  */
  110.  
  111.     /* these next two variables are provided to allow
  112.     ** system developers to have a rough idea of the
  113.     ** period of two externally controlled signals --
  114.     ** the time between vertical blank interrupts and the
  115.     ** external line rate (which is counted by CIA A's
  116.     ** "time of day" clock).  In general these values
  117.     ** will be 50 or 60,  and may or may not track each
  118.     ** other.  These values replace the obsolete AFB_PAL
  119.     ** and AFB_50HZ flags.
  120.     */
  121.     BYTE    VBlankFrequency     /* (readable) */
  122.     BYTE    PowerSupplyFrequency    /* (readable) */
  123.  
  124.     _List SemaphoreList 
  125.  
  126.     /* these next two are to be able to kickstart into user ram.
  127.     ** KickMemPtr holds a singly linked list of MemLists which
  128.     ** will be removed from the memory list via AllocAbs.  If
  129.     ** all the AllocAbs's succeeded,  then the KickTagPtr will
  130.     ** be added to the rom tag list.
  131.     */
  132.     ADDRESS    KickMemPtr  /* ptr to queue of mem lists */
  133.     ADDRESS    KickTagPtr  /* ptr to rom tag queue */
  134.     ADDRESS    KickCheckSum    /* checksum for mem and tags */
  135.  
  136. /****** V36 Exec additions start here **************************************/
  137.  
  138.     SHORTINT   ex_Pad0         /* Private internal use */
  139.     LONGINT   ex_LaunchPoint      /* Private to Launch/Switch */
  140.     ADDRESS    ex_RamLibPrivate 
  141.     /* The next LONGINT contains the system "E" clock frequency, 
  142.     ** expressed in Hertz.  The E clock is used as a timebase for
  143.     ** the Amiga's 8520 I/O chips. (E is connected to "02").
  144.     ** Typical values are 715909 for NTSC,  or 709379 for PAL.
  145.     */
  146.     LONGINT   ex_EClockFrequency  /* (readable) */
  147.     LONGINT   ex_CacheControl     /* Private to CacheControl calls */
  148.     LONGINT   ex_TaskID       /* Next available task ID */
  149.  
  150.     STRING ex_Reserved1 SIZE 20  /* 5*SIZEOF(LONGINT) */
  151.  
  152.     ADDRESS    ex_MMULock      /* private */
  153.  
  154.     STRING ex_Reserved2 SIZE 12   /* 3*SIZEOF(LONGINT)  */
  155.  
  156. /****** V39 Exec additions start here **************************************/
  157.  
  158.     /* The following list and data element are used
  159.      * for V39 exec's low memory handler...
  160.      */
  161.     MinList ex_MemHandlers  /* The handler list */
  162.     ADDRESS    ex_MemHandler       /* Private! handler pointer */
  163. END STRUCT 
  164.  
  165.  
  166. /****** Bit defines for AttnFlags (see above) ******************************/
  167.  
  168. /*  Processors and Co-processors: */
  169. #define AFB_68010   0   /* also set for 68020 */
  170. #define AFB_68020   1   /* also set for 68030 */
  171. #define AFB_68030   2   /* also set for 68040 */
  172. #define AFB_68040   3
  173. #define AFB_68881   4   /* also set for 68882 */
  174. #define AFB_68882   5
  175. #define AFB_FPU40   6   /* Set if 68040 FPU */
  176. /*
  177.  * The AFB_FPU40 bit is set when a working 68040 FPU
  178.  * is in the system.  If this bit is set and both the
  179.  * AFB_68881 and AFB_68882 bits are not set,  then the 68040
  180.  * math emulation code has not been loaded and only 68040
  181.  * FPU instructions are available.  This bit is valid *ONLY*
  182.  * if the AFB_68040 bit is set.
  183.  */
  184.  
  185. #define AFB_PRIVATE 15  /* Just what it says */
  186.  
  187. #define AFF_68010   (1&)
  188. #define AFF_68020   (2&)
  189. #define AFF_68030   (4&)
  190. #define AFF_68040   (8&)
  191. #define AFF_68881   (16&)
  192. #define AFF_68882   (32&)
  193. #define AFF_FPU40   (64&)
  194.  
  195. #define AFF_PRIVATE (32768&)
  196.  
  197. /* #define AFB_RESERVED8   8 */
  198. /* #define AFB_RESERVED9   9 */
  199.  
  200.  
  201. /****** Selected flag definitions for Cache manipulation calls **********/
  202.  
  203. #define CACRF_EnableI       (1&)  /* Enable instruction cache */
  204. #define CACRF_FreezeI       (2&)  /* Freeze instruction cache */
  205. #define CACRF_ClearI        (8&)  /* Clear instruction cache  */
  206. #define CACRF_IBE       (16&)  /* Instruction burst enable */
  207. #define CACRF_EnableD       (256&)  /* 68030 Enable data cache  */
  208. #define CACRF_FreezeD       (512&)  /* 68030 Freeze data cache  */
  209. #define CACRF_ClearD        (2048&) /* 68030 Clear data cache   */
  210. #define CACRF_DBE       (4096&) /* 68030 Data burst enable */
  211. #define CACRF_WriteAllocate (8192&) /* 68030 Write-Allocate mode
  212.                     (must always be set!)    */
  213. #define CACRF_EnableE       (1073741824&) /* Master enable for external caches */
  214.                      /* External caches should track the */
  215.                      /* state of the internal caches */
  216.                      /* such that they do not cache anything */
  217.                      /* that the internal cache turned off */
  218.                      /* for. */
  219. #define CACRF_CopyBack      (2147483648&) /* Master enable for copyback caches */
  220.  
  221. #define DMA_Continue        (2&)  /* Continuation flag for CachePreDMA */
  222. #define DMA_NoModify        (4&)  /* Set if DMA does not update memory */
  223. #define DMA_ReadFromRAM     (8&)  /* Set IF DMA goes *FROM* RAM TO device */
  224.  
  225.  
  226. #endif  /* EXEC_EXECBASE_H */
  227.